\section{Potential Plugin Specifications}
\fancyfoot[C]{Potential Plugin Specifications}
In keeping with SRS Requirements 3.6.1 and 3.6.2, we explore a few options for potential plugins.\newline \newline
The CMS is designed to allow for a simply-expandable system where users ``drop in'' executable code to a directory known to the CMS. This user-developed code is aware of the CMS's API and functionality as detailed in Section \ref{sec:API} of the Siberia CMS Design Document and leverages it to gain access to the database.
\newline \newline
In this section, we provide a few class decompositions of example plugins that can be used to this end, along with a subsection exploring the benefits of multiple plugins:
\begin{itemize}
\item Vladivostok Market, an e-commerce plugin.
\item Russian Roulette Syndication, a fun RSS tool.
\item Imperial Gallery, a ready-built plugin for album management.
\item People's Parliament, a forum extension.
\end{itemize}
We also detail how to manipulate Plugin functionalities to extend one Plugin's Displays using other Displays from even unrelated Plugins.

\subsection{Vladivostok Marketplace}
Vladivostok Marketplace (``Vlad'', for short) is an e-commerce plugin. Vlad is designed to add on additional functionality that allows the site to function as a shop. To this end, a new data structure is required for a shopping cart, but much of the ``storefront'' can be reduced to Content and Content Types that initiate business logic unique to Vlad.

\subsubsection{Class Overview of Vladivostok Market}
At a low level, Vlad provides a ``VladItem'' Content Type that developers may extend to make their own shop item Content Type. A ``VladCart'' provides shopping cart functionality, and ``VladPaymentManager'' is the gateway to access various payment methods; implementations of these payment methods extend ``VladPaymentMethod'' and are displayed by a ``VladPaymentMethodDisplay''. Figure \ref{fig:VladClassDiagram} examines the relationships between these classes more closely. 

\begin{figure}[!ht]
  \centering
    \includegraphics[width=6in]{VladClassDiagram.eps}
  \caption{Class diagram of the Vladivostok Market plugin.}
\label{fig:VladClassDiagram}
\end{figure}

\subsubsection{Site Flow}
Figures \ref{fig:VladFlowBuyCart} and \ref{fig:VladFlowPayLog} illustrate the flow of events that transpire during the usual flow for a user's session on a Vlad-served e-commerce site.
\begin{description}
\item[Initial Setup]Upon installation, the plugin creates the new VladBuyable Content Type. The plugin ships with the VladBuyableDisplay compatible with the Content Type. A complete ``VladPaymentManagerDisplay'' is added alongside VladPaymentManager.

\item[Browsing the Site]The user browsing the shop sees normal Siberia CMS web pages, where VladBuyables are arranged by VladBuyableDisplays. VladBuyables can be ``added'' to the user's VladCart, an extra table that is added to the Data Layer whenever a user begins a new shopping session or resumes an unfinished one. The contents of each user's VladCart can be viewed in a ``VladCartDisplay'', which provides functionality to add or remove items from said VladCart.

\item[Adding an Item to the Cart]VladBuyableDisplays will execute Siberia CMS API calls (AddRow) in order to add VladCartItems to the VladCart, when asked to by a browsing user. The VladCartItem refers to a VladBuyable and a positive/nonzero quantity of items specified by the executing user. A VladCart can contain any nonnegative number of VladCartItems.

\item[Checking Out]When a user wishes to purchase the items in the VladCart, the user initiates the process from within the ``VladCartDisplay'''s dialog. The user confirms a desire to purchase the items in the Cart, entering a contract with the shop host/administrator. This is signified by a flag in the user's Cart data, that blocks further changes and signifies a debt to the company incurred by the user.

\item[Selecting Payment Method]The user is guided to a payment method selection menu (``VladPaymentManager''). Several payment methods (``VladPaymentPaypalStandard'', ``VladPaymentPaypalPro'', ``VladPaymentWorldpay'', all using the ``VladPaymentMethod'' interface) are presented via the display, and the user may select one.

\item[Entering Transaction Data]The selected VladPaymentMethod executes its implemented functionality and obtains a user's payment information, for the final transaction operation.

\item[Final Confirmations]The VladPaymentMethod attempts to complete the payment and execute the transfer of funds, and reports to the user the success or failure of the operation, and modifies the flag on the user's Cart appropriately.

\item[Transaction Logging]For any failed or completed monetary transaction, metrics and other information are saved to the Data Layer in a ``VladTransaction'' via a ``VladTransactionLog'''s functionality. A VladTransaction contains information such as customer ID, date of attempt, indication and description of the success or failure, and the payment method. An Administrator and/or the owner of the Vlad shop may view and search this log via a ``VladTransactionLogDisplay''.
\end{description}

\begin{figure}[!ht]
  \centering
    \includegraphics[width=6in]{VladFlowBuyCart.eps}
  \caption{Flow/swimlane diagram of a user browsing a Vlad-extended Siberia CMS shop and adding VladCartItems to the VladCart.}
\label{fig:VladFlowBuyCart}
\end{figure}

\begin{figure}[!ht]
  \centering
    \includegraphics[width=6in]{VladFlowPayLog.eps}
  \caption{Flow/swimlane diagram of the full CMS process occuring when paying for and logging the result of a transaction.}
\label{fig:VladFlowPayLog}
\end{figure}

\subsubsection{VladBuyableType}
A Content Type representing the superset of things that can be ``added to a cart''. Actual entries derive from this, not unlike the Content Type-Content relationship.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladBuyableType} \\
\hline
Name & Type & Description\\ \hline \hline
Price & Field & The price of the item. Decimal type.\hbreak
Currency & Field & The currency the price is in. String type.\hbreak
Desc & Field & A textual representation that would ideally describe the item. String type.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladBuyable}
A Content representing a single buyable item. It derives all of its Field Values from VladBuyableType.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladBuyable} \\
\hline
Name & Type & Description\\ \hline \hline
Price & Double & The price of the item.\hbreak
Currency & String & The currency the price is in.\hbreak
Desc & String & A textual representation that would ideally describe the item.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladBuyableDisplay}
Provides a default arrangement for a series of VladBuyable.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladBuyableDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladCartItem}
The representation of a item put in a VladCart in a Vlad-served shop. Contains fields for which item (VladBuyable) it references, and a quantity thereof.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladCartItem} \\
\hline
Name & Type & Description\\ \hline \hline
ID & long & A unique identifier for this VladCartItem.\hbreak
BID & long & The CID of a VladBuyable in the Data Layer.\hbreak
Quantity & int & A nonnegative quantity, of how many items of type BID are to be bought.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladCart}
Entities are stored in a database table seperate from the Content/Content Type/etc. tables. One VladCart represents any number of VladBuyables placed into it by a User, the user holding the cart, and the session the VladCart was created in.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladCart} \\
\hline
Name & Type & Description\\ \hline \hline
Items & long[ ] & Series of BIDs of VladCartItems. \hbreak
UID & long & A reference to a User that owns this VladCart.\hbreak
SID & long & A session ID, for persistence.\hbreak
Lock & boolean & Signifies the User entered a contract to pay for items in this Cart.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{ConfirmPurchase(long cartID)} \\
\hline
Input & cartID: The ID of a VladCart.\hbreak
Output & cartID.Lock = true, then calls VladPaymentManager.InitiatePaymentSequence.\hbreak
Description & Writes the purchase contract, then begins the payment selection process.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladCartDisplay}
Display method for a VladCart. Provides ASP.NET codebehind that allows the user to call VladPaymentManager.InitiatePaymentSequence.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladCartDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentManagerDisplay}
Though not a true Display, it does provide the ASP.NET controls required to provide an interface to VladPaymentManager, and from there initiate a specific payment method.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentManagerDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
Methods & String[ ] & VladPaymentManager.Methods.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{InitiatePaymentSequence( Void )} \\
\hline
Input & Void\hbreak
Output & VladPaymentManager(payment name selected).\hbreak
Description & Payment name chosen from within the Display controls.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentManager}
Contains references to implemented payment methods e.g. PayPal.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentManger} \\
\hline
Name & Type & Description\\ \hline \hline
Methods & String[ ] & Identifiers for various available VladPaymentMethods.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetPaymentMethods(Void)} \\
\hline
Input & Void\hbreak
Output & A list of references to VladPaymentMethods.\hbreak
Description & For preparing any list of VladPaymentMethods being displayed or operated on.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{InitiatePayment(String Type, long cartID)} \\
\hline
Input & Type/cartID: Name of a VladPaymentMethod, and ID of VladCart to run purchase logic on.\hbreak
Output & Initiates PurchaseFromCart(cartID) for the VladPaymentMethod whose Name = Type.\hbreak
Description & Initiates the buy/payment flow for a customer.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{PaymentResult(long cartID, boolean success)} \\
\hline
Input & cartID/success: Success or failure for a given payment attempt VladCart cartID.\hbreak
Output & cartID = success, redirection to a page that indicates success or failure.\hbreak
Description & Final step in payment execution.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentMethod}
Interface. Contains provider-specific code that can be accessed from the VladPaymentManager.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentMethod} \\
\hline
Name & Type & Description\\ \hline \hline
ID & long & A unique identifier for the Method, for identification.\hbreak
Name & String & Name of the Method, for convenient identification or web presentation purposes. \hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{PurchaseFromCart(long cartID)} \\
\hline
Input & cartID: Unique identifier for a VladCart.\hbreak
Output & Initiates purchase routines implemented for the specific class.\hbreak
Description & See (Insert flow diagram.)\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentMethodDisplay}
User interface that contains ASP.NET codebehind calls to an associated VladPaymentMethod for payment methods. Must be tailored to each VladPaymentMethod (and thus each payment service), as credentials or business logic needed vary from service to service.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentMethodType} \\
\hline
Name & Type & Description\\ \hline \hline
Name & String & The name of the VladPaymentMethod this Display is mated to.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentPaypalStandard}
Initiates a PayPal Website Payments Standard payment sequence of dialogs.
\begin{enumerate}
\item When the user starts the payment process under VladPaymentPaypalStandard.PurchaseFromCart, the user is redirected to PayPal's website.
\item PayPal provides the necessary functionality to confirm the financial details to the buyer. It returns an HTTP value or request to the VladPaymentPaypalStandard signifying the success or failure of the monetary transaction.
\item After interpreting the value or request, VladPaymentPaypalStandard executes VladPaymentManager.PaymentResult.
\end{enumerate}
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentPaypalStandard} \\
\hline
Name & Type & Description\\ \hline \hline
URL & String & URL to redirect the browsing user to when getting transaction details.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentPaypalPro}
Initiates a PayPal Website Payments Pro payment sequence of dialogs.
\begin{enumerate}
\item When the user starts the payment process under VladPaymentPaypalPro.PurchaseFromCart, the user is shown a display which prompts the user for financial details for one of the supported payment types (Visa, MasterCard, etc). This display also forces the page to be loaded with SSL for security purposes.
\item The display sends a secure request via POST or GET to PayPal's server, which returns a response request to the VladPaymentPaypalPro signifying the success or failure of the monetary transaction.
\item After interpreting the request, VladPaymentPaypalPro executes VladPaymentManager.PaymentResult.
\end{enumerate}
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentPaypalPro} \\
\hline
Name & Type & Description\\ \hline \hline
URL & String & URL to send a request with user's transaction details to.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentWorldpay}
Initiates a Worldpay payment sequence of dialogs.
\begin{enumerate}
\item When the user starts the payment process under VladPaymentWorldpay.PurchaseFromCart, the user is shown a display which prompts the user for financial details for one of the supported payment types (Visa, MasterCard, etc). This display also forces the page to be loaded with SSL for security purposes.
\item The display sends a secure request via POST or GET to Worldpay's server, which returns a response request to the VladPaymentWorldpay signifying the success or failure of the monetary transaction.
\item After interpreting the request, VladPaymentWorldpay executes VladPaymentManager.PaymentResult.
\end{enumerate}
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentWorldpay} \\
\hline
Name & Type & Description\\ \hline \hline
URL & String & URL to send a request with user's transaction details to.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentPaypalStandardDisplay}
The display method for VladPaymentPaypalStandard's logic, as well as the codebehind access to the sequence of events for VladPaymentPaypalStandard.PurchaseFromCart.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentPaypalStandardDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\multicolumn{3}{|c|}{}\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentPaypalProDisplay}
The display method for VladPaymentPaypalPro's logic, as well as the codebehind access to the sequence of events for VladPaymentPaypalPro.PurchaseFromCart.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentPaypalProDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\multicolumn{3}{|c|}{}\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladPaymentWorldpayDisplay}
The display method for VladPaymentWorldpay's logic, as well as the codebehind access to the sequence of events for VladPaymentWorldpay.PurchaseFromCart.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladPaymentWorldpayDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\multicolumn{3}{|c|}{}\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladTransactionLog}
An aggregation of VladTransactions.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{Class} \\
\hline
Name & Type & Description\\ \hline \hline
Entries & VladTransaction[ ] & List of attempted Transactions.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddEntry(VladTransactionEntry VTE)} \\
\hline
Input & VTE: A complete VladTransaction entry, ready to be added to the Log.\hbreak
Output & Adds the VladTransaction to the Log.\hbreak
Description & Basic post-transaction action, for keeping track of payment attempts.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemoveEntry(long TID)} \\
\hline
Input & TID: CID of a specific VladTransaction.\hbreak
Output & Removes the Transaction with CID = TID from the Log.\hbreak
Description & Removes entries as dictated by the User.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemoveEntries(long [ ] TIDs)} \\
\hline
Input & TIDs: CIDs of specific VladTransactionEntries.\hbreak
Output & Removes each VladTransaction in the Log. Returns text log of any failed removals.\hbreak
Description & For en masse removal of VladTransactions from the Log.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntry(long TID)} \\
\hline
Input & TID: CID of a specific VladTransaction.\hbreak
Output & Returns a pointer to a VladTransaction.\hbreak
Description & For element-specific queries for Entries.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntriesByUser(long UID)} \\
\hline
Input & UID: ID of a specific User.\hbreak
Output & An array of Entries by that specific User.\hbreak
Description & For more focused searching of the Log for various purposes i.e. trending extensions.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntriesByType(String TransactionType)} \\
\hline
Input & TransactionType: Name of a particular VladPaymentMethod.\hbreak
Output & All transactions that were conducted via the particular VladPaymentMethod.\hbreak
Description & Various uses, including VladPaymentMethod debugging.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntriesBySuccess(boolean success)} \\
\hline
Input & success: A boolean, the state of the VladTransaction to be searched for.\hbreak
Output & All transactions where VladTransaction.Success = success.\hbreak
Description & Searching by failure or success specifically.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntriesAfterDate(DateTime date)} \\
\hline
Input & date: Date after which to search for VladTransaction entries.\hbreak
Output & List of VladTransactions with timestamps after the given date.\hbreak
Description & Searching after specific dates.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntriesBeforeDate(DateTime date)} \\
\hline
Input & date: Date before which to search for VladTransaction entries.\hbreak
Output & List of VladTransactions with timestamps before the given date.\hbreak
Description & Searching before specific dates.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetEntriesBetweenDates(DateTime bDate, DateTime aDate)} \\
\hline
Input & bDate, aDate: Times before and after the timeframe to search for VladTransactions.\hbreak
Output & List of VladTransactions with timestamps between the given dates.\hbreak
Description & Searching between specific dates.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{VladTransaction}
A singular record of an attempted payment, its success or failure, and any relevant information, if available. Inherits from Content.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{VladTransaction} \\
\hline
Name & Type & Description\\ \hline \hline
TransDate & DateTime & Timestamp of the transaction.\hbreak
PayType & String & The name of the VladPaymentMethod that triggered the creation of this entry.\hbreak
User & long & UID of the specific User that attempted to do the transaction.\hbreak
Success & boolean & Success or failure of the particular transaction. True is success.\hbreak
Reason & String & Comment or error message about why a particular transaction succeeded or failed.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsection{Russian Roulette Syndication}
Russian Roulette Syndication (``RouSS'', for short) is an uncomplicated RSS plugin. To this end, there are two main content-oriented class sets and a managerial class:
\begin{description}
\item[RouSSItem]Its Content Type serves as a template for future Content entities. The RouSSItemDisplay manages any collection of RouSSItems' display method. RouSSItem is the Content entity for this set.
\item[RouSSFeed]RouSSFeedType is a template for future RouSSFeeds. RouSSFeeds are collections of RouSSItems; its display method is managed by a RouSSFeedDisplay.
\item[RouSSManager]Backend code, such as adding or removing RouSSItems from RouSSFeeds and removing entire RouSSFeeds are implemented here. RouSSManager also contains a ``Roulette'' function to obtain a RouSSFeed for prominent display, or otherwise.
\end{description}

\begin{figure}[!ht]
  \centering
    \includegraphics[width=6in]{Roulette.eps}
  \caption{A diagram outlining the class relationships of the Russian Roulette Syndication entities.}
\label{fig:RouSS}
\end{figure}

\subsubsection{RouSSItemType}
Represents the characteristics of any RSS post. Subclass of Content Type.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RouSSItemType} \\
\hline
Name & Type & Description\\ \hline \hline
Header & Field & The title of the Item; a text entity.\hbreak
Timestamp & Field & The date of submission; a datetime entity.\hbreak
Body & Field & Additional description text; a text entity.\hbreak
Hotlink & Field & A URL to the desired article or destination; a text entity.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{RouSSItemDisplay}
Display method for a RouSSItem. Contains markup placeholders for each field in RouSSItemType.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RoussItemDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\multicolumn{3}{|c|}{} \hbreak
\end{tabular}
\linebreak
\vspace{2em}


\subsubsection{RouSSItem}
An RSS post. Subclass of Content.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RouSSItem} \\
\hline
Name & Type & Description\\ \hline \hline
Header & FieldValue & The title of the Item; a text entity.\hbreak
Timestamp & FieldValue & The date of submission; a datetime entity.\hbreak
Body & FieldValue & Additional description text; a text entity.\hbreak
Hotlink & FieldValue & A URL to the desired article or destination; a text entity.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{RouSSFeedType}
Content Type that characterizes RSS feeds or aggregates.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RouSSFeedType} \\
\hline
Name & Type & Description\\ \hline \hline
Name & Field & Title of the Feed, a text entity. \hbreak
Hotlink & Field & A URL to the XML file that contains the aggregate entries of the Feed; text entity.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{RouSSFeedDisplay}
Display method for a RouSSFeed. Includes a way to display the access point to at least the RouSSFeed XML file, the feed's title and the description.\newline 
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RouSSFeedDisplay} \\
\hline
Name & Type & Description\\ \hline \hline
\multicolumn{3}{|c|}{} \hbreak
\end{tabular}
\linebreak
\vspace{2em}


\subsubsection{RouSSFeed}
A representation of an RSS feed.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RouSSFeed}\\
\hline
Name & Type & Description\\ \hline \hline
PostList & RouSSItem[] & A list of past syndicated elements.\hbreak
WasChanged & boolean & True if any edits occured since the RouSSManager last checked.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddPost(RouSSItem item)} \\
\hline
Input & item: A freshly-created syndicated item.\hbreak
Output & True for a successful add, false otherwise.\hbreak
Description & Basic method for adding elements to the feed. Fires update mechanisms in RouSSManager.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemovePost(long CID)} \\
\hline
Input & CID: The RouSSItem's Content ID.\hbreak
Output & True if the RouSSItem with matching CID is removed, false otherwise. \hbreak
Description & Basic method for removing elements on the feed. Fires update mechanisms in RouSSManager.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetPost(integer index)} \\
\hline
Input & index: The index of a RouSSItem element in PostList.\hbreak
Output & A RouSSItem at PostList[item], or null if nothing exists at that index.\hbreak
Description & Retrieval of individual entries.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{RouSSManager}
Manages the RSS feeds and provides ways to access their contents, as well as the Roulette function.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{RouSSManager} \\
\hline
Name & Type & Description\\ \hline \hline
Feeds & RouSSFeed[ ] & Array of feeds affiliated with the Manager/Plugin.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RoulettePost(Void)} \\
\hline
Input & Void\hbreak
Output & The first RouSSItem from a random RouSSFeed in Feeds, or null if none exist.\hbreak
Description & The ``Roulette'' part of the RouSS functionality.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetFeed(integer index)} \\
\hline
Input & index: The sequential index of a RouSSFeed.\hbreak
Output & A reference to the RouSSFeed at Feeds[index], or null if not found.\hbreak
Description & Functionality to access a particular feed.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{GetFeedElements(integer index)} \\
\hline
Input & index: The sequential index of a RouSSFeed.\hbreak
Output & A reference to a Feeds[index].PostList, or null the RouSSFeed doesn't exist.\hbreak
Description & Used to populate onsite RSS feeds.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{FlagUpdate(Void)} \\
\hline
Input & Void\hbreak
Output & Re-writes the RSS XML files with current feed information.\hbreak
Description & Allows for an en masse update of files read by aggregators.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{FlagUpdate(RouSSFeed feed)} \\
\hline
Input & Feed: A specific RouSSFeed.\hbreak
Output & Rewrites that RouSSFeed's XML file with current feed information.\hbreak
Description & Allows for the update of a single file read by RSS aggregators.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsection{Imperial Gallery}
Imperial Gallery (``Impgal'', for short) is a system that allows the user to easily harness Lightbox 2 functionality in making functional and presentable picture albums.

\subsubsection{Overview}
The ImpgalManager is the main point of interaction for the plugin; it exposes methods to administer aggregations of certain Content and a Display together to create a coherent web element that can be placed onto a page. ImpgalAlbums contain a reference to a set of ImpgalPictures. Both ImpgalAlbums and ImpgalPictures have Content and Content Type representations available, with associated actions and Displays. Figure \ref{fig:ImpgalClassDiagram} elaborates on this via class diagram.

\begin{figure}[!ht]
  \centering
    \includegraphics[width=6in]{ImpgalClassDiagram.eps}
  \caption{Class diagram of the Imperial Gallery plugin.}
\label{fig:ImpgalClassDiagram}
\end{figure}

\pagebreak
\subsubsection{Functional Decomposition}
When the User first adds an ImpgalAlbum, the Impgal must first create the Content Types ImpgalAlbumType and ImpgalPictureType (first two calls to the CMS API). Afterward, Impgal provides a sample ImpgalAlbum and ImpgalPicture that can be used.
\begin{figure}[!ht]
  \centering
    \includegraphics[height=7in]{ImpgalFirstAdd.eps}
  \caption{A diagram outlining the process involved in adding the first ImpgalAlbum to the CMS Data Layer.}
\label{fig:ImpgalFirstAdd}
\end{figure}
\pagebreak

Removing an ImpgalAlbum uses quite a few of the same procedures:
\begin{enumerate}
\item The appropriate dialog in the Impgal plugin is accessed.
\item A list of ImpgalAlbums is seen, and one or more albums are selected for removal.
\item A request to ImpgalManager is sent to first remove all ImpgalPictures under ImpgalAlbum, then remove the ImpgalAlbum.
\end{enumerate}
\begin{figure}[!ht]
  \centering
    \includegraphics[height=6in]{ImpgalRemoveAlbum.eps}
  \caption{A diagram outlining the process involved in removing an ImpgalAlbum.}
\label{fig:ImpgalRemove}
\end{figure}
\pagebreak

Users add more ImpgalPictures via the Add Content dialogs in the main CMS, as Impgal previously added the ImpgalPictureType. When the user is ready to add an ImpgalAlbum, 
\begin{enumerate}
\item The appropriate dialog in the Impgal plugin is accessed.
\item A list of ImpgalPictures is created in the dialog.
\item A request to ImpgalManager is sent to create an ImpgalAlbum usiing the list of ImpgalPictures.
\end{enumerate}
Execution flow closely resembles that of of removal as detailed in Figure \ref{fig:ImpgalRemove}, though calls are made to add ImpgalPictures by the user; the creation of the ImpgalAlbum is done by the ImpgalManager.

\subsubsection{ImpgalAlbumType}
As a Content Type, it describes the superset of all ImpgalAlbums; all ImpgalAlbums have these fields. The ImpgalAlbumLinkDisplay is the display method for this Content Type.\newline
%CT -> IAT
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ImpgalAlbumType} \\
\hline
Name & Type & Description\\ \hline \hline
Name & Field & Name of the Album. String type.\hbreak
Description & Field & Description of the album. String type.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalAlbum}
The Content representation of an album. Maintains references to ImpgalPictures.\newline
%C -> IA
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ImpgalAlbum} \\
\hline
Name & Type & Description\\ \hline \hline
Name & String & Name of the album.\hbreak
Description & String & Textual description of the Album.\hbreak
Pictures & ImpgalPicture[ ] & References to all ImpgalPictures this ImpgalAlbum contains.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalAlbumLinkDisplay}
Provides a template class for the graphical representation of a link that triggers the display of an ImpgalLightboxDisplay.\newline
%Display -> AlbumLink
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{Class} \\
\hline
Name & Type & Description\\ \hline \hline
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{TriggerSendLightbox(long AID)} \\
\hline
Input & AID: Identifier for an Album.\hbreak
Output & CMS functionality sends a ImpgalLightboxDisplay with ImpgalPictures = AID to the client.\hbreak
Description & Appears as a mundane link in the ImpgalAlbumLinkDisplay. Executes codebehind.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalLightboxDisplay}
Frontend code of the ImpgalLightboxDisplay contains an implementation of a Lightbox 2 element that can execute when displayed in a web page. As a Display, it maintains an entry point for a Display-Content management system to inject ImpgalPictures to.\newline
%Display -> Lightbox
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ImpgalLightbox} \\
\hline
Name & Type & Description\\ \hline \hline
Pictures & long[ ] & References to ImpgalPictures.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalPictureType}
The Content Type that all ImpgalPictures derive from. Can be extended, just like any other Content Type. Created and written to the database when the first ImpgalAlbum is added, via (Section).\newline
%ContentType -> IPT
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ImpgalPictureType} \\
\hline
Name & Type & Description\\ \hline \hline
Picture & Field & Placeholder for the picture's binary data. \hbreak
Date & Field & Placeholder for the time of the picture's submission to the Data Layer. Datetime.\hbreak
Name & Field & The placeholder for the name of the picture, as a String.\hbreak
Desc & Field & A placeholder for the description of the file, as a String.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalPicture}
The Content representation of a picture. Has values for all fields defined by ImpgalPictureType. Implicitly extended when derivations of ImpgalPictureType are created.\newline
%Content -> IP
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ImpgalPicture} \\
\hline
Name & Type & Description\\ \hline \hline
Picture & FieldValue & The picture's binary data. \hbreak
Datetime & FieldValue & The time of the picture's submission to the CMS data layer, as a datetime.\hbreak
Name & FieldValue & The name of the picture, as a String.\hbreak
Desc & FieldValue & A description of the file, as a String.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalManagerDisplay}
Contains visual elements and codebehind to access ImpgalManager's functionality.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{Class} \\
\hline
Name & Type & Description\\ \hline \hline
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ImpgalManager}
Content management class, whose methods are exposed to Users via ImpgalManagerDisplay. Executes ImpgalAlbum creation, modification, and removal routines.\newline
%Manager
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ImpgalManager} \\
\hline
Name & Type & Description\\ \hline \hline
Albums & ImpgalAlbum[ ] & List of references to ImpgalAlbums. \hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddAlbum(Void)} \\
\hline
Input & Void \hbreak
Output & Creates an ImpgalAlbum with ImpgalAlbum.Presentation.Pictures = a single ImpgalPicture.\hbreak
Description & Descr\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddAlbum(long[ ] PicIDs)} \\
\hline
Input & PicIDs: A reference to any number of ImpgalPicture CIDs.\hbreak
Output & Creates an ImpgalAlbum with ImpgalAlbum.Presentation.Pictures = PicIDs.\hbreak
Description & See (Add section here)\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{ModifyAlbum(long[ ] PicIDs, long AID)} \\
\hline
Input & PicIDs/AID: IDs for Pictures and an Album.\hbreak
Output & Sets the the ImpgalAlbum with ID AID's Pictures to PicIDs.\hbreak
Description & See (Section)\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{DeleteAlbum(long AID)} \\
\hline
Input & AID: The CID of an Album.\hbreak
Output & Removes ImpgalPictures associated with ImpgalAlbum AID before removing AID.\hbreak
Description & See (section)\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsection{People's Parliament}
People's Parliament (``Parl'', for short) is a bare-functionality message board system that allows users to hold temporarily-archived conversations between each other. It also supports variable visibility to different grades of User/User Types, as necessary.

\begin{figure}[!ht]
  \centering
    \includegraphics[width=6in]{ParlClassDiagram.eps}
  \caption{Class Diagram of People's Parliament plugin.}
\label{fig:ParlClassDiagram}
\end{figure}

\subsubsection{ParlPost}
A textual document created by a User. At minimum contains a reference to a its Creator's ID, a Timestamp, and post text.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ParlPost} \\
\hline
Name & Type & Description\\ \hline \hline
Creator & long & User ID of Post creator. \hbreak
Content & String & Text pertaining to the Post.\hbreak
Timestamp & DateTime & Time/Date the Post was submitted to the CMS.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ParlTopic}
A topic, with access to a list of ParlPosts that Users have added to it.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ParlTopic} \\
\hline
Name & Type & Description\\ \hline \hline
Name & String & Name of the Topic. Akin to a subject header.\hbreak
Posts & ParlPost[ ] & Posts that are inside the Topic.\hbreak
Locked & boolean & True if Users can no longer make posts to the Topic, false otherwise.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{LockTopic(boolean isLocked)} \\
\hline
Input & isLocked: The desired state of the topic locking.\hbreak
Output & ParlTopic.Locked = isLocked\hbreak
Description & Changes the locked/unlocked state of a Topic.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddPost(long Post)} \\
\hline
Input & Post: CID to a ParlPost.\hbreak
Output & ParlTopic.Posts.append(Post).\hbreak
Description & For adding a Post to Topic.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemovePost(long Post)} \\
\hline
Input & Post: CID to a ParlPost.\hbreak
Output & ParlTopic.Posts.remove(Post).\hbreak
Description & For removing a Post from a Topic.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ParlBoard}
A message board, with a list of ParlTopics.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ParlBoard} \\
\hline
Name & Type & Description\\ \hline \hline
Name & String & Name of the Board, for identification purposes, for example.\hbreak
Description & String & Board description.\hbreak
Topics & ParlTopic[ ] & List of references to ParlTopics.\hbreak
SubBoards & ParlBoard[ ] & List of references to ParlBoards contained in this Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddTopic(long Topic)} \\
\hline
Input & Topic: CID to a ParlTopic.\hbreak
Output & ParlBoard.Topics.append(Topic)\hbreak
Description & For adding a Topic to a Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemoveTopic(long Topic)} \\
\hline
Input & Topic: CID to a ParlTopic.\hbreak
Output & ParlBoard.Topics.remove(Topic)\hbreak
Description & For removing a Topic from a Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddBoard(long Board)} \\
\hline
Input & Board: CID to a ParlBoard.\hbreak
Output & ParlBoard.SubBoards.append(Board)\hbreak
Description & For adding a SubBoard to a Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemoveBoard(long Board)} \\
\hline
Input & Board: CID to a ParlBoard.\hbreak
Output & ParlBoard.SubBoards.remove(Board)\hbreak
Description & For removing a SubBoard from a Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ParlBoardPrivs}
Controls User access to a ParlBoard.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ParlBoardPrivs} \\
\hline
Name & Type & Description\\ \hline \hline
Board & long & the CID of a ParlBoard this ParlBoardPrivs is concerned with.\hbreak
User & long & The ID of a User or User Type in question.\hbreak
TopicCreatePriv & boolean & If the User/User Type in question can create Topics.\hbreak
BoardViewPriv & boolean & If the User/User Type in question can view the Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ParlTopicPrivs}
Controls User access to a ParlTopic.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ParlTopic} \\
\hline
Name & Type & Description\\ \hline \hline
Topic & long & the CID of a ParlTopic this ParlTopicPrivs is concerned with.\hbreak
User & long & The ID of a User or User type in question.\hbreak
CanPost & boolean & If the User/User Type in question can create Posts.\hbreak
CanView & boolean & If the User/User Type in question can view the Topic.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\subsubsection{ParlForumManager}
Manages Board, Topic, and Post creation and associations.\newline
\begin{tabular}{ | c || c | l |} 
\hline
\multicolumn{3}{|c|}{ParlForumManager} \\
\hline
Name & Type & Description\\ \hline \hline
Boards & ParlBoard[ ] & Boards contained in this Forum.\hbreak
BoardPrivs & ParlBoardPrivs[ ] & Privileges in effect on the Forum with regard to Boards.\hbreak
TopicPrivs & ParlTopicPrivs[ ] & Privileges in effect on the Forum with regard to Topics.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{AddBoard(long Board)} \\
\hline
Input & Board: CID to a ParlBoard.\hbreak
Output & ParlBoard.SubBoards.append(Board)\hbreak
Description & For adding a SubBoard to a Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{RemoveBoard(long Board)} \\
\hline
Input & Board: CID to a ParlBoard.\hbreak
Output & ParlBoard.SubBoards.remove(Board)\hbreak
Description & For removing a SubBoard from a Board.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{SetBoardPrivs(long UID, long BID, boolean view, boolean add)} \\
\hline
Input & UID/BID/view/add: User UID to receive permissions view/add for ParlBoard BID.\hbreak
Output & Creates or modifies a ParlBoardPrivs to match the given properties.\hbreak
Description & Permission management for a ParlBoard.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\begin{tabular}{ | c || l |} 
\hline
\multicolumn{2}{|c|}{SetTopicPrivs(long UID, long TID, boolean view, boolean add)} \\
\hline
Input & UID/TID/view/add: User UID to receive permissions view/add for ParlTopic TID.\hbreak
Output & Creates or modifies a ParlTopicPrivs to match the given properties.\hbreak
Description & Permission management for a ParlTopic.\hbreak
\end{tabular}
\linebreak
\vspace{2em}

\input{PluginSynergy}
